package com.njwb.controller;

import com.njwb.pojo.Dept;
import com.njwb.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DeptController {
    @Autowired
    private DeptService deptService;
    @GetMapping("/dept/{deptNo}")
    public Dept getByNo(@PathVariable("deptNo")Integer deptNo){
        return deptService.getByNo(deptNo);
    }
}
